package com.decent.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author decent
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Order implements Serializable {

    private static final long serialVersionUID = -1369942390565179472L;

    @TableId(type = IdType.AUTO)
    private Long id;

    private Integer uid;

    private String orderNo;

    private String userOrderNo;

    private Long productId;

    private Integer count;

    private BigDecimal payPrice;

    private Integer integral;

    private String totalPrice;

    private String orderStatus;

    private LocalDateTime buyTime;

    private LocalDateTime createTime;


    public String getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(String totalPrice) {
        this.totalPrice = totalPrice == null ? null : totalPrice.trim();
    }

}